{% extends 'base.html' %}


{% block content %}

	<form action="" method="post" enctype="multipart/form-data">
	
	{% csrf_token %}
	
	<table>
		
		{{ main_form.as_table }}
	
	</table>
	
	{% for error in main_form.errors %}
		<div>error</div>
	{% endfor %}
	
	<hr/>
	<table>
		{% for field in dataset_form %}
			
			{% if field.name == 'dataset_file' %}
				<tr><th></th><td ><a href="/site_media/{{ dataset_form.initial.dataset_file }}">{{ dataset_form.initial.dataset_file }}</a></td></tr>
				<input type="hidden" value="{{ dataset_form.initial.dataset_file }}" name="dataset_file_uploaded">
			{% endif %}
			<tr><th>{{ field.label_tag }}</th><td>{{ field }}</td></tr>
		
		{% endfor %}
		
	</table>
	
	{% for error in dataset_form.errors %}
		<div>error</div>
	{% endfor %}
	
		<input type="submit" value="Wyślij">
		
	</form>

{% endblock %}